<?php
class Entry extends AppModel
{
	public $name = "Entry";
	public $validate = array(
			'id' 		=> 'numeric',
			'value'		=> array(
							'rule' => array('between', 1, 10000)
						),
			'title' =>  array(
							'rule' => array('maxLength', 512)
						),
	);
	
	function getEntriesByIds($inputIds)
	{
		$ids = array();
		$data = array();
		$i = 0;
		$ids = explode(",", $inputIds);
		foreach ($ids as $id)
		{
			$data[$i] = $this->findById($id);
			if ($data[$i] != array())
			{
				$i++;
			}
		}
        
		return $data;
	}
};
?>